/*
 * Copyright © 2011 by Rob Cash
 * 
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 * 
 * MockPlugInManager.java
 * 
 * Created on Jul 24, 2011 at 11:21:05 AM
 */
package org.robcash.commons.plugin.mock;

import org.robcash.commons.plugin.impl.registry.SpringPlugInManager;
import org.robcash.xmlns.commons.plugin.registry.SpringAwarePlugInInfoType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * MockPlugInManager
 * @author Rob
 */
public class MockSpringPlugInManager extends SpringPlugInManager<MockPlugIn, SpringAwarePlugInInfoType>
{

	@SuppressWarnings("unused")
	private static final Logger LOG = LoggerFactory.getLogger(MockSpringPlugInManager.class);

	//    @Override
	//    protected List<PlugInInfoType> getPlugInInfoFromRegistry(URL registryURL) throws PlugInManagerException
	//    {
	//        try
	//        {
	//            JAXBContext jaxbContext = JAXBContext.newInstance("org.robcash.xmlns.commons.plugin");
	//            Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
	//            Object unmarshalledRegistry = unmarshaller.unmarshal(registryURL);
	//            if ( unmarshalledRegistry instanceof JAXBElement )
	//            {
	//                return ((JAXBElement<PlugInRegistryType>) unmarshalledRegistry).getValue().getPlugInInfo();
	//            }
	//            else
	//            {
	//                return ((PlugInRegistryType) unmarshalledRegistry).getPlugInInfo();
	//            }
	//        }
	//        catch( JAXBException je )
	//        {
	//            LOG.error("Discovery failed", je);
	//            throw new PlugInManagerException("Discovery failed", je);
	//        }
	//    }

}
